<template>
  <!-- 积分打印 -->
  <!-- 干部责任清单 -->
  <div class="print">
    <!-- <div>年月: {{ newData.date_month }}</div>
    <div>姓名: {{ newData.employee_name }}</div>
    <div>工号: {{ newData.employee_barcode }}</div>
    <div>------</div>
    <div>明细行</div>
    <div>
      id | 姓名 | 工号 | 时间 | 类型 | 项目 | 加分分值 | 减分分值 | 否决 |
      月度积分
    </div>
    <div v-for="line in newData.line_ids__print" :key="line.id">
      {{ line.id }} | {{ line.employee_name }} | {{ line.employee_barcode }} |
      {{ line.create_date }} | {{ line.item_type__name }} |
      {{ line.item_name }} | {{ line.plus_score }} | {{ line.minus_score }} |
      {{ line.clear_flag }} | {{ line.total }}
    </div> -->

    <div id="printMe">
      <table
        id="printMe"
        align="center"
        width="100%"
        border="1"
        cellspacing="0"
        cellpadding="0"
        style="border:none;"
      >
        <caption align="top">
          <h1>邯郸站干部安全诚信积分考核台账</h1>
          <!-- <p style="font-size:20px">年&emsp;号</p> -->
        </caption>
        <caption>
          <div style="height:30px;font-size:20px">
            <div style="position:absolute;">
              车间（中间站）、科室：{{ newData.employee_dept_id__name }}
            </div>
            <div style="position:absolute;right:70px">
              填发日期：{{ newData.date_month }}
            </div>
          </div>
        </caption>

        <tr>
          <th style=" border-color: #000;">序号</th>
          <th class="topButtonTable">姓名</th>
          <th class="topButtonTable">工号</th>
          <th class="topButtonTable">时间</th>
          <th class="topButtonTable">类型</th>
          <th class="topButtonTable">项目</th>
          <th class="topButtonTable">加分分值</th>
          <th class="topButtonTable">减分分值</th>
          <th class="topButtonTable">否决</th>
          <th class="topButtonTable">月度积分</th>
        </tr>

        <template v-for="line in newData.line_ids__print">
          <tr :key="line.id">
            <td class="topButtonTableLeft">{{ line.id }}</td>
            <td class="innerTable">{{ line.employee_name }}</td>
            <td class="innerTable">{{ line.employee_barcode }}</td>
            <td class="innerTable">{{ line.create_date }}</td>
            <td class="innerTable">{{ line.item_type__name }}</td>
            <td class="innerTable">{{ line.item_name }}</td>
            <td class="innerTable">{{ line.plus_score }}</td>
            <td class="innerTable">{{ line.minus_score }}</td>
            <td class="innerTable">{{ line.clear_flag }}</td>
            <td class="innerTable">{{ line.total }}</td>
          </tr>
        </template>
        <tr>
          <td colspan="10" border="0" style="border:none;text-align:left">
            <div style="position:relative;height:30px">
              <p style="margin:10px;position:absolute">主要负责人签字</p>
              <p style="margin:10px;position:absolute;right:0px">年 月 日</p>
            </div>
          </td>
        </tr>
        <tr>
          <td border="0" colspan="10" style="border:none;text-align:left">
            <p style="margin:10px">
              注：本通知书一三两份，失信人一份；所在部门一份、劳人科一份，分别留存1年备查。
            </p>
          </td>
        </tr>
      </table>
    </div>
    <div style="text-align:center;margin-top:16px;">
      <el-button v-print="'#printMe'" type="primary">打印</el-button>
    </div>
  </div>
</template>

<script>
import './style.scss'
export default {
  props: {
    data: { type: Object, default: () => {} }
  },

  create() {},
  computed: {
    newData() {
      return this.data
    }
  }
}
</script>

<style lang="scss" scoped>
.listStyle {
  list-style: none;
  // margin: 0;
  li {
    display: inline-block;
    margin-right: 15px;
    input {
      height: 17px;
      margin: 0 3px;
    }
  }
}
</style>
